import { Component, ChangeDetectionStrategy } from '@angular/core';
import { MenuItem } from '@iux/live';

const Items: MenuItem[] = [
  {
    id: 'Edit',
    label: 'Edit',
    tips: 'This is edit.',
  },
  {
    id: 'Delete',
    label: 'Delete',
    disabled: true,
    tips: 'This is delete.',
  },
  {
    id: 'File',
    label: 'File',
    tips: 'This is file.',
    items: [
      {
        id: 'File-Create',
        label: 'Create',
        tips: 'This is create.',
      },
      {
        id: 'File-Open',
        label: 'Open',
        tips: 'This is open.',
      },
      {
        id: 'File-Save',
        label: 'Save',
        tips: 'This is save.',
      },
    ],
  },
  {
    id: 'Do',
    label: 'Do',
    tips: 'This is do.',
    items: [
      {
        id: 'Do-Undo',
        label: 'Undo',
        tips: 'This is undo.',
      },
      {
        id: 'Do-Redo',
        label: 'Redo',
        tips: 'This is redo.',
      },
    ],
  },
  {
    id: 'Help',
    label: 'Help',
    tips: 'This is help.',
  },
  {
    id: 'Actions',
    label: 'Actions',
    disabled: true,
    divide: true,
    tips: 'This is actions.',
  },
  {
    id: 'Exit',
    label: 'Exit',
    tips: 'This is exit',
  },
];
@Component({
  templateUrl: './prompt.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PromptComponent {
  items = Items;

  getItems = (): MenuItem[] => this.items;
}
